package com.itmayiedu.controller;

import com.itmayiedu.dao.UserDao;
import com.itmayiedu.model.test.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Devin on 2018/1/21.
 */
@RestController
public class JpaController {

    @Autowired
    private UserDao userDao;

    @RequestMapping("find")
    public String find(Integer id){
        User user = userDao.findOne(id);
        return user.toString();
    }
}
